package com.google.code.gaeapptest.dao;

import java.util.Date;
import java.util.List;

import com.google.code.gaeapptest.domain.TestCategory;
import com.google.code.gaeapptest.domain.TestData;

public interface Dao {
	/**
	 * Get list of Tests grouped by Category
	 * 
	 * @return list of TestCategory
	 */
	List<TestCategory> getTestCategories();

	/**
	 * Get the test data points for a given category and test name
	 * 
	 * @param category
	 * @param testName
	 * @return list of TestData
	 */
	List<TestData> getTestData(String category, String testName);


	/**
	 * Update database result
	 * @param category - eg Transaction
	 * @param testName - eg createTransaction
	 * @param elapsedMs - eg 200
	 * @param msg - eg OK
	 */
	void saveResult(Date d, String category, String testName, long elapsedMs, String msg);

	/**
	 * calculate a new moving average curve
	 * @param category
	 * @param testName
	 */
	void updateMovingAverage(String category, String testName);

}
